1000
|
It is possible to clip the bar's caption to bar, when the time scale is changed

with AxG2antt1 do
begin
Columns.Add('Task');
with Chart do
begin
PaneWidth[False] := 48;
FirstVisibleDate := '12/27/2000';
with Bars.Item['Task'] do
begin
Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
Height := 13;
end;
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/6/2001','K1','This is a bit of text that get''s clipped');
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(4);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip] := ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption];
h := AddItem('Task 2');
AddBar(h,'Task','1/2/2001','1/6/2001','K1','This is a bit of text that is not clipped');
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(1);
end;
end
|
999
|
How can I change the color for all bars with the key matching a pattern

with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 64;
Debug := True;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/4/2001','A',Nil);
AddBar(h,'Task','1/5/2001','1/7/2001','B1',Nil);
AddBar(h,'Task','1/8/2001','1/17/2001','B2',Nil);
AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K3',Nil);
AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','B4',Nil);
ItemBar[0,'<B*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
end;
end
|
998
|
How can I change the color for all bars in the same item with the key matching a pattern

with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 64;
Debug := True;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/4/2001','A',Nil);
AddBar(h,'Task','1/5/2001','1/7/2001','B1',Nil);
AddBar(h,'Task','1/8/2001','1/17/2001','B2',Nil);
AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K3',Nil);
AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K4',Nil);
ItemBar[h,'<B*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
end;
end
|
997
|
How can I change the color for all bars in the same item

with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(h,'Task','1/5/2001','1/7/2001','K2',Nil);
AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K3',Nil);
AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K4',Nil);
ItemBar[h,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
end;
end
|
996
|
How can I write a special number for each date related to a bar

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
with Chart do
begin
FirstVisibleDate := '1/1/2001';
PaneWidth[False] := 32;
LevelCount := 2;
end;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/2/2001','1/13/2001','1',Nil);
end;
with Chart.Notes do
begin
with Add('N1',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
RelativePosition := 'S+2';
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '4';
PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18;
PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := -9;
PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteStart] := $ffff;
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteStart] := True;
end;
with Add('N2',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
RelativePosition := 'S+3';
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '4';
PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18;
PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := -9;
PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteStart] := $ffff;
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteStart] := True;
end;
with Add('N3',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
RelativePosition := 'S+4';
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '5';
PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18;
PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := -9;
PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteStart] := $ff00;
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteStart] := True;
end;
with Add('N4',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
RelativePosition := 'S+5';
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '5';
PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18;
PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := -9;
PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteStart] := $ff00;
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteStart] := True;
end;
with Add('N5',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
RelativePosition := 'S+6';
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '8';
PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18;
PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := -9;
PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteStart] := $ff;
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteStart] := True;
end;
with Add('Z',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
RelativePosition := 'E';
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '4';
PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18;
PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := -9;
PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteStart] := $80ff;
PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteStart] := True;
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteStart] := True;
end;
end;
EndUpdate();
end
|
995
|
How can I assign a note to be always in the center of the bar

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/5/2001','1/8/2001','1',Nil);
end;
with Chart.Notes do
begin
with Add('Note',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
RelativePosition := TObject(0.5);
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := 'note<br>center';
PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteStart] := $ffff;
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
end;
end;
EndUpdate();
end
|
994
|
How can I assign a note relative to the start of the bar, and let it be movable

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/5/2001','1/8/2001','1',Nil);
end;
with Chart.Notes do
begin
with Add('Note',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
RelativePosition := 'S+1';
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '<%d%>';
PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18;
PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := 9;
PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteStart] := True;
PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteStart] := $ffff;
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
end;
end;
EndUpdate();
end
|
993
|
How can I associate a note relative to the start of the bar

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/5/2001','1/8/2001','1',Nil);
end;
with Chart.Notes do
begin
with Add('Note',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
RelativePosition := 'S+1';
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '<%d%>';
PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18;
PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := 9;
PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteStart] := $ffff;
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
end;
end;
EndUpdate();
end
|
992
|
How can I associate a note relative to the end of the bar, so if the bar is resized at the end, the not is moved accordingly

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/5/2001','1/8/2001','1',Nil);
end;
with Chart.Notes do
begin
with Add('Note',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
RelativePosition := 'E-1';
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '<%d%>';
PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18;
PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := 9;
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
end;
end;
EndUpdate();
end
|
991
|
How can I associate a note relative to the end of the bar, so if the bar is resized at the end, the not is moved accordingly

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/5/2001','1/8/2001','1',Nil);
end;
with Chart.Notes do
begin
with Add('Note',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
RelativePosition := TObject(1);
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := 'End';
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
end;
end;
EndUpdate();
end
|
990
|
How can I hide a bar without removing it
with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '1/1/2001';
PaneWidth[False] := 128;
LevelCount := 2;
end;
HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels;
Columns.Add('Column');
with Items do
begin
AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001','B1',Nil);
AddBar(AddItem('Item 2'),'Task','1/6/2001','1/14/2001','B2',Nil);
AddLink('L1',FindItem['Item 1',TObject(0),Nil],'B1',FindItem['Item 2',TObject(0),Nil],'B2');
ItemBar[FirstVisibleItem,FirstItemBar[FirstVisibleItem],EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(100);
end;
EndUpdate();
end
|
989
|
How can I align the caption in the note

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/5/2001','1/8/2001','1',Nil);
end;
with Chart.Notes do
begin
with Add('N1',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := 'S <b><%dd%></b>';
PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 48;
PartAlignment[EXG2ANTTLib.NotePartEnum.exNoteStart] := EXG2ANTTLib.AlignmentEnum.LeftAlignment;
PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := 17;
end;
with Add('N2',TObject(AxG2antt1.Items.FirstVisibleItem),'1','') do
begin
RelativePosition := TObject(1);
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkHidden;
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := 'E <b><%dd%></b>';
PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 48;
PartAlignment[EXG2ANTTLib.NotePartEnum.exNoteStart] := EXG2ANTTLib.AlignmentEnum.RightAlignment;
PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := 17;
end;
end;
EndUpdate();
end
|
988
|
How I can assign a note and let user move the note relative to the bar

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/5/2001','1/8/2001','1',Nil);
end;
with Chart.Notes do
begin
with Add('Note',TObject(AxG2antt1.Items.FirstVisibleItem),'1','End') do
begin
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := 'Day<br> <%dd%>';
PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteStart] := True;
PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := 16;
PartTransparency[EXG2ANTTLib.NotePartEnum.exNoteStart] := 30;
PartToolTip[EXG2ANTTLib.NotePartEnum.exNoteStart] := 'Click the note and start moving to a new position.';
end;
end;
EndUpdate();
end
|
987
|
How can I assign a picture as a note associated with a bar

with AxG2antt1 do
begin
BeginUpdate();
set_HTMLPicture('pic1','c:\exontrol\images\zipdisk.gif');
set_HTMLPicture('pic2','c:\exontrol\images\auction.gif');
AntiAliasing := True;
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/5/2001','1/8/2001','1',Nil);
h := AddItem('Task 2');
AddBar(h,'Task','1/7/2001','1/11/2001','2',Nil);
end;
with Chart.Notes do
begin
with Add('1',TObject(AxG2antt1.Items.ItemByIndex[0]),'1','<img>pic1</img>') do
begin
PartShadow[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
PartBorderSize[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 0;
ClearPartBackColor(EXG2ANTTLib.NotePartEnum.exNoteEnd);
PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := -64;
PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteEnd] := True;
end;
with Add('2',TObject(AxG2antt1.Items.ItemByIndex[1]),'2','<img>pic2</img>') do
begin
PartShadow[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
PartBorderSize[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 0;
ClearPartBackColor(EXG2ANTTLib.NotePartEnum.exNoteEnd);
RelativePosition := TObject(1);
PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteEnd] := True;
LinkColor := $ff;
LinkWidth := 2;
LinkStyle := EXG2ANTTLib.LinkStyleEnum.exLinkDot;
ShowLink := EXG2ANTTLib.NoteLinkTypeEnum.exNoteLinkVisible;
end;
end;
EndUpdate();
end
|
986
|
How can I assign a picture as a note associated with a bar

with AxG2antt1 do
begin
BeginUpdate();
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
AntiAliasing := True;
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/5/2001','1/8/2001','1',Nil);
h := AddItem('Task 2');
AddBar(h,'Task','1/7/2001','1/11/2001','2',Nil);
end;
with Chart.Notes do
begin
with Add('1',TObject(AxG2antt1.Items.ItemByIndex[0]),'1','<img>1</img>') do
begin
PartShadow[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
PartBorderSize[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 0;
ClearPartBackColor(EXG2ANTTLib.NotePartEnum.exNoteEnd);
end;
with Add('2',TObject(AxG2antt1.Items.ItemByIndex[1]),'2','<img>2</img>...<img>3</img>') do
begin
PartShadow[EXG2ANTTLib.NotePartEnum.exNoteEnd] := False;
PartBorderSize[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 0;
ClearPartBackColor(EXG2ANTTLib.NotePartEnum.exNoteEnd);
RelativePosition := TObject(1);
PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteEnd] := True;
LinkColor := $ff;
LinkWidth := 2;
LinkStyle := EXG2ANTTLib.LinkStyleEnum.exLinkDot;
end;
end;
EndUpdate();
end
|
985
|
How can I put a box assigned to a DATE

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Item 1');
h := AddItem('Item 2');
end;
with Chart.Notes do
begin
with Add('D1',TObject(AxG2antt1.Items.FirstVisibleItem),AxG2antt1.Chart.FirstVisibleDate,'Date:<br><%dd%>/<%mm%><br><b><%yyyy%></b>') do
begin
PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteEnd] := True;
PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 20;
PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 20;
end;
with Add('D2',TObject(AxG2antt1.Items.NextVisibleItem[AxG2antt1.Items.FirstVisibleItem]),'1/7/2001','Date:<br><%dd%>/<%mm%><br><b><%yyyy%></b>') do
begin
PartVisible[EXG2ANTTLib.NotePartEnum.exNoteStart] := True;
PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '<b><%d%></b>';
PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteEnd] := True;
PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 20;
PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 20;
end;
end;
EndUpdate();
end
|
984
|
How can I add a note or a box associated with a bar

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/5/2001','1/8/2001','1','Center');
ItemBar[h,'1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'left';
ItemBar[h,'1',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(16);
h := AddItem('Task 2');
AddBar(h,'Task','1/7/2001','1/11/2001','2','Center');
ItemBar[h,'2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'right';
ItemBar[h,'2',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(18);
end;
with Chart.Notes do
begin
Add('1S',TObject(AxG2antt1.Items.FirstVisibleItem),'1','Start');
Add('1F',TObject(AxG2antt1.Items.FirstVisibleItem),'1','End').RelativePosition := TObject(1);
end;
EndUpdate();
end
|
983
|
Is it possible to define different working hours for every week day

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
PaneWidth[False] := 14;
NonworkingDays := 0;
NonworkingHours := 0;
FirstVisibleDate := '1/1/2001';
LevelCount := 2;
with Level[0] do
begin
Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
Label := '<%dddd%>';
end;
with Level[1] do
begin
Label := '<%hh%>';
Count := 6;
end;
UnitWidth := 16;
end;
Columns.Add('');
with Items do
begin
h := AddItem(TObject(1));
ItemNonworkingUnits[h,TObject(False)] := 'weekday(value) != 1 or (weekday(value) = 1 and not ( hour(value) >= 9 and hour(value) <= 14 ))';
h := AddItem(TObject(2));
ItemNonworkingUnits[h,TObject(False)] := 'weekday(value) = 2 and ( hour(value) >= 9 and hour(value) <= 14 )';
h := AddItem(TObject(3));
ItemNonworkingUnits[h,TObject(False)] := 'weekday(value) = 3';
end;
EndUpdate();
end
|
982
|
How can I automatically update the exBarPercent value using a slider control

with AxG2antt1 do
begin
BeginUpdate();
Items.AllowCellValueToItemBar := True;
with Chart do
begin
FirstVisibleDate := '1/1/2002';
PaneWidth[False] := 128;
Bars.Add('Task%Progress').Shortcut := 'Percent';
end;
with (Columns.Add('Percent') as EXG2ANTTLib.Column) do
begin
Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(518);
Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := 'P';
end;
with Items do
begin
i := AddItem(TObject(0));
CellBold[TObject(i),TObject(0)] := True;
CellEditor[TObject(i),TObject(0)].EditType := EXG2ANTTLib.EditTypeEnum.SliderType;
AddBar(i,'Percent','1/2/2002','1/6/2002','P',Nil);
ItemBar[i,'P',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True);
CellValue[TObject(i),TObject(0)] := TObject(50);
end;
EndUpdate();
end
|
981
|
Is there any automatic way to change a property for all bars in the chart
with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Items do
begin
AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K2',Nil);
AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K3',Nil);
AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K4',Nil);
ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
end;
end
|
980
|
How can I assign an icon to a bar and I get notified when I click it

with AxG2antt1 do
begin
BeginUpdate();
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/5/2001','1/10/2001','','Caption');
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := '<a1><img>1:8</img></a><a1><img>2</img></a>';
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(16);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHOffset] := TObject(5);
end;
EndUpdate();
end
|
979
|
How can I assign an icon to a bar so I do not break its caption

with AxG2antt1 do
begin
BeginUpdate();
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/5/2001','1/10/2001','','Caption');
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := '<img>1</img>';
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(16);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHOffset] := TObject(5);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionVOffset] := TObject(2);
end;
EndUpdate();
end
|
978
|
How can I assign multiple lables to the same bar

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','1/5/2001','1/7/2001','','Right');
ItemBar[h1,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
AddBar(h1,'','1/5/2001','1/5/2001','T1','Left');
ItemBar[h1,'T1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(16);
AddBar(h1,'','1/5/2001','1/7/2001','T2','Center');
GroupBars(h1,'',True,h1,'T1',True,Nil,Nil);
GroupBars(h1,'',True,h1,'T1',False,Nil,Nil);
GroupBars(h1,'',True,h1,'T2',True,Nil,Nil);
GroupBars(h1,'',False,h1,'T2',False,Nil,Nil);
end;
EndUpdate();
end
|
977
|
Is there any way to have more Captions on a bar than one

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','1/5/2001','1/7/2001','','Right');
ItemBar[h1,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
AddBar(h1,'','1/5/2001','1/5/2001','T1','Left');
ItemBar[h1,'T1',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(16);
GroupBars(h1,'',True,h1,'T1',True,Nil,Nil);
GroupBars(h1,'',True,h1,'T1',False,Nil,Nil);
end;
EndUpdate();
end
|
976
|
How can I assign multiple lables to the same bar at once

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
Chart.PaneWidth[False] := 96;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/5/2001','1/8/2001','','Center');
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'left';
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(16);
h := AddItem('Task 2');
AddBar(h,'Task','1/7/2001','1/11/2001','','Center');
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaption] := 'right';
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarExtraCaptionHAlign] := TObject(18);
end;
EndUpdate();
end
|
975
|
How can I limit the duration or length of the bar
with AxG2antt1 do
begin
BeginUpdate();
Chart.FirstVisibleDate := '1/1/2001';
Chart.ScrollRange[EXG2ANTTLib.ScrollRangeEnum.exStartDate] := '1/1/2001';
Chart.ScrollRange[EXG2ANTTLib.ScrollRangeEnum.exEndDate] := '1/7/2001';
Chart.PaneWidth[False] := 128;
Columns.Add('Column');
with Items do
begin
h := AddItem('Item 1');
AddBar(h,'Task','1/2/2001','1/5/2001',Nil,Nil);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarMinDuration] := TObject(2);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarMaxDuration] := TObject(5);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := 'Min=2 / Max=5';
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
end;
EndUpdate();
end
|
974
|
I have an EBN file how can I apply different colors to it, so no need to create a new one

with AxG2antt1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
SelBackColor := BackColor;
SelForeColor := ForeColor;
HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Nil,'Default');
ItemBackColor[hC] := $1000000;
ItemHeight[InsertItem(h,Nil,'')] := 6;
hC := InsertItem(h,Nil,'Light Green');
ItemBackColor[hC] := $100ff00;
AxG2antt1.Chart.ItemBackColor[hC] := $100ff00;
ItemHeight[InsertItem(h,Nil,'')] := 6;
hC := InsertItem(h,Nil,'Dark Green');
ItemBackColor[hC] := $1007f00;
ItemHeight[InsertItem(h,Nil,'')] := 6;
hC := InsertItem(h,Nil,'Magenta');
ItemBackColor[hC] := $1ff7fff;
ItemHeight[InsertItem(h,Nil,'')] := 6;
hC := InsertItem(h,Nil,'Yellow');
ItemBackColor[hC] := $17fffff;
ItemHeight[InsertItem(h,Nil,'')] := 6;
ExpandItem[h] := True;
end;
end
|
973
|
I need to specify the non-working hours for about 100 days for each item, but the scrolling is very slow. Is there any option to increase the speed

with AxG2antt1 do
begin
BeginUpdate();
AllowChartScrollPage := True;
Columns.Add('Non-Work');
with Chart do
begin
FirstVisibleDate := '4/4/2009 4:00:00 PM';
PaneWidth[False] := 52;
LevelCount := 2;
UnitWidth := 16;
with Level[0] do
begin
Label := '<r><%d%>-<%mmm%>';
Unit := EXG2ANTTLib.UnitEnum.exDay;
end;
with Level[1] do
begin
Label := '<%hh%>';
Unit := EXG2ANTTLib.UnitEnum.exHour;
Count := 2;
end;
end;
with Items do
begin
AddItem('Default');
ItemNonworkingUnits[AddItem('Test'),TObject(False)] := 'date(shortdate(value)) case(default:0;#4/5/2009# : hour(value) >= 6 and hour(value) <= 12; #4/6/2009# : hour(value) >= 6 and hou' +
'r(value) <= 12; #4/7/2009# : hour(value) >= 6 and hour(value) <= 12; #4/8/2009# : hour(value) >= 6 and hour(value) <= 12; #4/9/2' +
'009# : hour(value) >= 6 and hour(value) <= 12; #4/10/2009# : hour(value) >= 6 and hour(value) <= 12; #4/11/2009# : hour(value) >' +
'= 6 and hour(value) <= 12; #4/12/2009# : hour(value) >= 6 and hour(value) <= 12; #4/13/2009# : hour(value) >= 6 and hour(value) ' +
'<= 12; #4/14/2009# : hour(value) >= 6 and hour(value) <= 12; #4/15/2009# : hour(value) >= 6 and hour(value) <= 12; #4/16/2009# :' +
' hour(value) >= 6 and hour(value) <= 12; #4/17/2009# : hour(value) >= 6 and hour(value) <= 12; #4/18/2009# : hour(value) >= 6 an' +
'd hour(value) <= 12; #4/19/2009# : hour(value) >= 6 and hour(value) <= 12; #4/20/2009# : hour(value) >= 6 and hour(value) <= 12;' +
' #4/21/2009# : hour(value) >= 6 and hour(value) <= 12; #4/22/2009# : hour(value) >= 6 and hour(value) <= 12; #4/23/2009# : hour(' +
'value) >= 6 and hour(value) <= 12; #4/24/2009# : hour(value) >= 6 and hour(value) <= 12; #4/25/2009# : hour(value) >= 6 and hour' +
'(value) <= 12; #4/26/2009# : hour(value) >= 6 and hour(value) <= 12; #4/27/2009# : hour(value) >= 6 and hour(value) <= 12; #4/28' +
'/2009# : hour(value) >= 6 and hour(value) <= 12; #4/29/2009# : hour(value) >= 6 and hour(value) <= 12; #4/30/2009# : hour(value)' +
' >= 6 and hour(value) <= 12; #5/1/2009# : hour(value) >= 6 and hour(value) <= 12; #5/2/2009# : hour(value) >= 6 and hour(value) ' +
'<= 12; #5/3/2009# : hour(value) >= 6 and hour(value) <= 12; #5/4/2009# : hour(value) >= 6 and hour(value) <= 12; #5/5/2009# : ho' +
'ur(value) >= 6 and hour(value) <= 12; #5/6/2009# : hour(value) >= 6 and hour(value) <= 12; #5/7/2009# : hour(value) >= 6 and hou' +
'r(value) <= 12; #5/8/2009# : hour(value) >= 6 and hour(value) <= 12; #5/9/2009# : hour(value) >= 6 and hour(value) <= 12; #5/10/' +
'2009# : hour(value) >= 6 and hour(value) <= 12; #5/11/2009# : hour(value) >= 6 and hour(value) <= 12; #5/13/2009# : hour(value) ' +
'>= 6 and hour(value) <= 12; #5/14/2009# : hour(value) >= 6 and hour(value) <= 12; #5/15/2009# : hour(value) >= 6 and hour(value)' +
' <= 12; #5/16/2009# : hour(value) >= 6 and hour(value) <= 12; #5/17/2009# : hour(value) >= 6 and hour(value) <= 12; #5/18/2009# ' +
': hour(value) >= 6 and hour(value) <= 12; #5/19/2009# : hour(value) >= 6 and hour(value) <= 12; #5/20/2009# : hour(value) >= 6 a' +
'nd hour(value) <= 12; #5/21/2009# : hour(value) >= 6 and hour(value) <= 12; #5/22/2009# : hour(value) >= 6 and hour(value) <= 12' +
'; #5/23/2009# : hour(value) >= 6 and hour(value) <= 12; #5/24/2009# : hour(value) >= 6 and hour(value) <= 12; #5/25/2009# : hour' +
'(value) >= 6 and hour(value) <= 12; #5/26/2009# : hour(value) >= 6 and hour(value) <= 12; #5/27/2009# : hour(value) >= 6 and hou' +
'r(value) <= 12; #5/28/2009# : hour(value) >= 6 and hour(value) <= 12; #5/29/2009# : hour(value) >= 6 and hour(value) <= 12; #5/3' +
'0/2009# : hour(value) >= 6 and hour(value) <= 12; #5/31/2009# : hour(value) >= 6 and hour(value) <= 12; #6/1/2009# : hour(value)' +
' >= 6 and hour(value) <= 12; #6/2/2009# : hour(value) >= 6 and hour(value) <= 12; #6/3/2009# : hour(value) >= 6 and hour(value) ' +
'<= 12; #6/4/2009# : hour(value) >= 6 and hour(value) <= 12; #6/5/2009# : hour(value) >= 6 and hour(value) <= 12; #6/6/2009# : ho' +
'ur(value) >= 6 and hour(value) <= 12; #6/7/2009# : hour(value) >= 6 and hour(value) <= 12; #6/8/2009# : hour(value) >= 6 and hou' +
'r(value) <= 12; #6/9/2009# : hour(value) >= 6 and hour(value) <= 12; #6/10/2009# : hour(value) >= 6 and hour(value) <= 12; #6/11' +
'/2009# : hour(value) >= 6 and hour(value) <= 12; #6/12/2009# : hour(value) >= 6 and hour(value) <= 12; #6/13/2009# : hour(value)' +
' >= 6 and hour(value) <= 12; #6/14/2009# : hour(value) >= 6 and hour(value) <= 12; #6/15/2009# : hour(value) >= 6 and hour(value' +
') <= 12; #6/16/2009# : hour(value) >= 6 and hour(value) <= 12; #6/17/2009# : hour(value) >= 6 and hour(value) <= 12; #6/18/2009#' +
' : hour(value) >= 6 and hour(value) <= 12; #6/19/2009# : hour(value) >= 6 and hour(value) <= 12; #6/21/2009# : hour(value) >= 6 ' +
'and hour(value) <= 12; #6/22/2009# : hour(value) >= 6 and hour(value) <= 12; #6/23/2009# : hour(value) >= 6 and hour(value) <= 1' +
'2; #6/24/2009# : hour(value) >= 6 and hour(value) <= 12; #6/25/2009# : hour(value) >= 6 and hour(value) <= 12; #6/26/2009# : hou' +
'r(value) >= 6 and hour(value) <= 12; #6/27/2009# : hour(value) >= 6 and hour(value) <= 12; #6/28/2009# : hour(value) >= 6 and ho' +
'ur(value) <= 12; #6/29/2009# : hour(value) >= 6 and hour(value) <= 12; #6/30/2009# : hour(value) >= 6 and hour(value) <= 12; #7/' +
'1/2009# : hour(value) >= 6 and hour(value) <= 12; #7/2/2009# : hour(value) >= 6 and hour(value) <= 12; #7/3/2009# : hour(value) ' +
'>= 6 and hour(value) <= 12; #7/4/2009# : hour(value) >= 6 and hour(value) <= 12; #7/5/2009# : hour(value) >= 6 and hour(value) <' +
'= 12; #7/6/2009# : hour(value) >= 6 and hour(value) <= 12; #7/7/2009# : hour(value) >= 6 and hour(value) <= 12; #7/8/2009# : hou' +
'r(value) >= 6 and hour(value) <= 12; #7/9/2009# : hour(value) >= 6 and hour(value) <= 12; #7/10/2009# : hour(value) >= 6 and hou' +
'r(value) <= 12; #7/11/2009# : hour(value) >= 6 and hour(value) <= 12; #7/12/2009# : hour(value) >= 6 and hour(value) <= 12; #7/1' +
'3/2009# : hour(value) >= 6 and hour(value) <= 12; #7/14/2009# : hour(value) >= 6 and hour(value) <= 12)';
ItemNonworkingUnits[AddItem('Test'),TObject(False)] := 'date(shortdate(value)) case(default:0;#4/5/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/6/' +
'2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/7/2009# : hour(value) >= 6 and hour(value) <=' +
' 10 or hour(value) in (16,17,20,21); #4/8/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/9/2' +
'009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/10/2009# : hour(value) >= 6 and hour(value) <=' +
' 10 or hour(value) in (16,17,20,21); #4/11/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/12' +
'/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/13/2009# : hour(value) >= 6 and hour(value) ' +
'<= 10 or hour(value) in (16,17,20,21); #4/14/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/' +
'15/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/16/2009# : hour(value) >= 6 and hour(value' +
') <= 10 or hour(value) in (16,17,20,21); #4/17/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #' +
'4/18/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/19/2009# : hour(value) >= 6 and hour(val' +
'ue) <= 10 or hour(value) in (16,17,20,21); #4/20/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21);' +
' #4/21/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/22/2009# : hour(value) >= 6 and hour(v' +
'alue) <= 10 or hour(value) in (16,17,20,21); #4/23/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21' +
'); #4/24/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/25/2009# : hour(value) >= 6 and hour' +
'(value) <= 10 or hour(value) in (16,17,20,21); #4/26/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,' +
'21); #4/27/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #4/28/2009# : hour(value) >= 6 and ho' +
'ur(value) <= 10 or hour(value) in (16,17,20,21); #4/29/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,2' +
'0,21); #4/30/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/1/2009# : hour(value) >= 6 and h' +
'our(value) <= 10 or hour(value) in (16,17,20,21); #5/2/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,2' +
'0,21); #5/3/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/4/2009# : hour(value) >= 6 and ho' +
'ur(value) <= 10 or hour(value) in (16,17,20,21); #5/5/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20' +
',21); #5/6/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/7/2009# : hour(value) >= 6 and hou' +
'r(value) <= 10 or hour(value) in (16,17,20,21); #5/8/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,' +
'21); #5/9/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/10/2009# : hour(value) >= 6 and hou' +
'r(value) <= 10 or hour(value) in (16,17,20,21); #5/11/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20' +
',21); #5/13/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/14/2009# : hour(value) >= 6 and h' +
'our(value) <= 10 or hour(value) in (16,17,20,21); #5/15/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,' +
'20,21); #5/16/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/17/2009# : hour(value) >= 6 and' +
' hour(value) <= 10 or hour(value) in (16,17,20,21); #5/18/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,1' +
'7,20,21); #5/19/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/20/2009# : hour(value) >= 6 a' +
'nd hour(value) <= 10 or hour(value) in (16,17,20,21); #5/21/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16' +
',17,20,21); #5/22/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/23/2009# : hour(value) >= 6' +
' and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/24/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (' +
'16,17,20,21); #5/25/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/26/2009# : hour(value) >=' +
' 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/27/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in' +
' (16,17,20,21); #5/28/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/29/2009# : hour(value) ' +
'>= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #5/30/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) ' +
'in (16,17,20,21); #5/31/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/1/2009# : hour(value)' +
' >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/2/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) ' +
'in (16,17,20,21); #6/3/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/4/2009# : hour(value) ' +
'>= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/5/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) i' +
'n (16,17,20,21); #6/6/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/7/2009# : hour(value) >' +
'= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/8/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in' +
' (16,17,20,21); #6/9/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/10/2009# : hour(value) >' +
'= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/11/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) i' +
'n (16,17,20,21); #6/12/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/13/2009# : hour(value)' +
' >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/14/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value)' +
' in (16,17,20,21); #6/15/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/16/2009# : hour(valu' +
'e) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/17/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(valu' +
'e) in (16,17,20,21); #6/18/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/19/2009# : hour(va' +
'lue) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/21/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(va' +
'lue) in (16,17,20,21); #6/22/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/23/2009# : hour(' +
'value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/24/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(' +
'value) in (16,17,20,21); #6/25/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/26/2009# : hou' +
'r(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/27/2009# : hour(value) >= 6 and hour(value) <= 10 or hou' +
'r(value) in (16,17,20,21); #6/28/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/29/2009# : h' +
'our(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #6/30/2009# : hour(value) >= 6 and hour(value) <= 10 or h' +
'our(value) in (16,17,20,21); #7/1/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/2/2009# : h' +
'our(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/3/2009# : hour(value) >= 6 and hour(value) <= 10 or ho' +
'ur(value) in (16,17,20,21); #7/4/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/5/2009# : ho' +
'ur(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/6/2009# : hour(value) >= 6 and hour(value) <= 10 or hou' +
'r(value) in (16,17,20,21); #7/7/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/8/2009# : hou' +
'r(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/9/2009# : hour(value) >= 6 and hour(value) <= 10 or hour' +
'(value) in (16,17,20,21); #7/10/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/11/2009# : ho' +
'ur(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/12/2009# : hour(value) >= 6 and hour(value) <= 10 or ho' +
'ur(value) in (16,17,20,21); #7/13/2009# : hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21); #7/14/2009# : ' +
'hour(value) >= 6 and hour(value) <= 10 or hour(value) in (16,17,20,21))';
AddItem('Default');
end;
EndUpdate();
end
|
972
|
How can I use the CASE statement (CASE usage)
with AxG2antt1 do
begin
BeginUpdate();
with (Columns.Add('Value') as EXG2ANTTLib.Column) do
begin
Width := 24;
Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
end;
with (Columns.Add('CASE - statment') as EXG2ANTTLib.Column) do
begin
ComputedField := '%0 case (default:''not found'';1:%0;2:2*%0;3:3*%0;4:4*%0;5:5*%0;7:''Seven'';8:''Eight'';9:''Nine'';11:''Eleven'';13:''Thirtheen'';14:''Fourth' +
'een'')';
ToolTip := ComputedField;
end;
with Items do
begin
AddItem(TObject(0));
AddItem(TObject(1));
AddItem(TObject(2));
end;
EndUpdate();
end
|
971
|
How can I use the CASE statement (CASE usage)
with AxG2antt1 do
begin
BeginUpdate();
with (Columns.Add('Value') as EXG2ANTTLib.Column) do
begin
Width := 24;
Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
end;
with (Columns.Add('CASE - statment') as EXG2ANTTLib.Column) do
begin
ComputedField := '%0 case (default:''not found'';1:''One'';2:''Two'';3:''Three'';4:''Four'';5:''Five'';7:''Seven'';8:''Eight'';9:''Nine'';11:''Eleven'';13:''Thirtheen''' +
';14:''Fourtheen'')';
ToolTip := ComputedField;
end;
with Items do
begin
AddItem(TObject(0));
AddItem(TObject(1));
AddItem(TObject(2));
end;
EndUpdate();
end
|
970
|
I have seen the IN function but it returns -1 or 0. How can I display the value being found ( SWITCH usage )
with AxG2antt1 do
begin
BeginUpdate();
with (Columns.Add('Value') as EXG2ANTTLib.Column) do
begin
Width := 24;
Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
end;
with (Columns.Add('SWITCH - statment') as EXG2ANTTLib.Column) do
begin
ComputedField := '%0 switch (''not found'', 1,2,3,4,5,7,8,9,11,13,14)';
ToolTip := ComputedField;
end;
with Items do
begin
AddItem(TObject(0));
AddItem(TObject(1));
AddItem(TObject(2));
end;
EndUpdate();
end
|
969
|
I have a large collection of constant values and using or operator is a time consuming (IN usage). Is there any way to increase the speed to check if a value maches the collection
with AxG2antt1 do
begin
BeginUpdate();
with (Columns.Add('Value') as EXG2ANTTLib.Column) do
begin
Width := 24;
Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
end;
with (Columns.Add('IN - statment') as EXG2ANTTLib.Column) do
begin
ComputedField := '%0 in (1,2,3,4,5,7,8,9,11,13,14) ? ''found'' : ''''';
ToolTip := ComputedField;
end;
with Items do
begin
AddItem(TObject(0));
AddItem(TObject(1));
AddItem(TObject(2));
end;
EndUpdate();
end
|
968
|
How can I automatically update the exBarPercent value using a slider control

with AxG2antt1 do
begin
BeginUpdate();
Items.AllowCellValueToItemBar := True;
with Chart do
begin
FirstVisibleDate := '1/1/2002';
PaneWidth[False] := 128;
Bars.Add('Task%Progress').Shortcut := 'Percent';
end;
with (Columns.Add('Percent') as EXG2ANTTLib.Column) do
begin
Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(12);
Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := 'P';
end;
with Items do
begin
i := AddItem(TObject(0));
CellBold[TObject(i),TObject(0)] := True;
with CellEditor[TObject(i),TObject(0)] do
begin
EditType := EXG2ANTTLib.EditTypeEnum.SliderType;
Option[EXG2ANTTLib.EditorOptionEnum.exSliderStep] := TObject(0.01);
Option[EXG2ANTTLib.EditorOptionEnum.exSpinStep] := TObject(0.01);
Option[EXG2ANTTLib.EditorOptionEnum.exSliderMax] := TObject(1);
Option[EXG2ANTTLib.EditorOptionEnum.exSliderWidth] := TObject(-100);
end;
CellValueFormat[TObject(i),TObject(0)] := EXG2ANTTLib.ValueFormatEnum.exHTML;
AddBar(i,'Percent','1/2/2002','1/6/2002','P',Nil);
ItemBar[i,'P',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True);
CellValue[TObject(i),TObject(0)] := TObject(0.5);
end;
EndUpdate();
end
|
967
|
How can I automatically update the exBarPercent value using a spin control

with AxG2antt1 do
begin
BeginUpdate();
Items.AllowCellValueToItemBar := True;
with Chart do
begin
FirstVisibleDate := '1/1/2002';
PaneWidth[False] := 128;
Bars.Add('Task%Progress').Shortcut := 'Percent';
end;
with (Columns.Add('Percent') as EXG2ANTTLib.Column) do
begin
Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(12);
FormatColumn := '((0:=round(dbl(%0)*100)) >= 50 ? ''<font 8>''+ =:0 + ''%</font>'' : ''<fgcolor=808080><font 6>''+ =:0 + ''%</font></fgcolor>'')';
end;
with Items do
begin
i := AddItem(TObject(0));
CellBold[TObject(i),TObject(0)] := True;
with CellEditor[TObject(i),TObject(0)] do
begin
EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
Option[EXG2ANTTLib.EditorOptionEnum.exSpinStep] := TObject(0.01);
Option[EXG2ANTTLib.EditorOptionEnum.exSliderMax] := TObject(1);
end;
CellValueFormat[TObject(i),TObject(0)] := EXG2ANTTLib.ValueFormatEnum.exHTML;
AddBar(i,'Percent','1/2/2002','1/6/2002',Nil,Nil);
CellValue[TObject(i),TObject(0)] := TObject(0.5);
end;
EndUpdate();
end
|
966
|
How do I specify for an item all units as being non-working units

with AxG2antt1 do
begin
BeginUpdate();
AllowChartScrollPage := True;
Columns.Add('Non-Work');
with Chart do
begin
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
FirstVisibleDate := '4/3/2009 10:00:00 AM';
PaneWidth[False] := 64;
LevelCount := 2;
UnitWidth := 16;
with Level[0] do
begin
Label := '<r><%d%>-<%mmm%>';
Unit := EXG2ANTTLib.UnitEnum.exDay;
end;
with Level[1] do
begin
Label := '<%hh%>';
Unit := EXG2ANTTLib.UnitEnum.exHour;
Count := 2;
end;
end;
with Items do
begin
AddItem('Default');
ItemNonworkingUnits[AddItem('All-Non-Working'),TObject(False)] := '1';
AddItem('Default');
end;
EndUpdate();
end
|
965
|
How do I specify for an item all units as being working units

with AxG2antt1 do
begin
BeginUpdate();
AllowChartScrollPage := True;
Columns.Add('Non-Work');
with Chart do
begin
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
FirstVisibleDate := '4/3/2009 10:00:00 AM';
PaneWidth[False] := 64;
LevelCount := 2;
UnitWidth := 16;
with Level[0] do
begin
Label := '<r><%d%>-<%mmm%>';
Unit := EXG2ANTTLib.UnitEnum.exDay;
end;
with Level[1] do
begin
Label := '<%hh%>';
Unit := EXG2ANTTLib.UnitEnum.exHour;
Count := 2;
end;
end;
with Items do
begin
AddItem('Default');
ItemNonworkingUnits[AddItem('All-Working'),TObject(False)] := '0';
AddItem('Default');
end;
EndUpdate();
end
|
964
|
How can I programmatically specify different non-working units ( days, hours ) for different items

with AxG2antt1 do
begin
BeginUpdate();
AllowChartScrollPage := True;
Columns.Add('Non-Work');
with Chart do
begin
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
Bars.Add('Task:Split').Shortcut := 'Task';
FirstVisibleDate := '7/13/2009 12:00:00 PM';
PaneWidth[False] := 52;
LevelCount := 2;
UnitWidth := 16;
with Level[0] do
begin
Label := '<r><b><%d%></b> <%mmm%> <%yyyy%>';
Unit := EXG2ANTTLib.UnitEnum.exDay;
end;
with Level[1] do
begin
Label := '<%hh%>';
Unit := EXG2ANTTLib.UnitEnum.exHour;
Count := 2;
end;
end;
with Items do
begin
h := AddItem('Item 1');
ItemNonworkingUnits[h,TObject(False)] := '(shortdate(value) = #7/14/2009# and hour(value) >= 6 and hour(value) <= 12)';
AddBar(h,'Task','7/14/2009 4:00:00 AM','7/14/2009 2:00:00 PM',Nil,Nil);
h := AddItem('Item 2');
ItemNonworkingUnits[h,TObject(False)] := '(((hour(value) >= 4 and hour(value) <= 16) or hour(value) = 2) and month(value) = 7) or ((hour(value) >= 2 and hour(value) < 10)' +
') and month(value) = 6 or weekday(value) = 6';
AddBar(h,'Task','7/14/2009 1:00:00 AM','7/14/2009 6:00:00 AM',Nil,Nil);
end;
EndUpdate();
end
|
963
|
I am programmatically select a date using the Chart.SelectDate property, but can't see why the date is not highlighted. What am I doing wrong
with AxG2antt1 do
begin
with Chart do
begin
LevelCount := 2;
FirstVisibleDate := '1/1/2001';
SelectLevel := 1;
SelectDate['1/4/2001'] := True;
end;
end
|
962
|
How do I show a shorter line in the chart's level

with AxG2antt1 do
begin
BeginUpdate();
GridLineColor := Color.FromArgb(128,128,128);
with Chart do
begin
DrawLevelSeparator := EXG2ANTTLib.LevelLineEnum.exLevelNoLine;
UnitWidth := 24;
FirstVisibleDate := '1/1/2001';
PaneWidth[False] := 0;
LevelCount := 2;
with Level[0] do
begin
Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
Label := '<%dddd%>';
DrawTickLines := Integer(EXG2ANTTLib.LevelLineEnum.exLevelLowerHalf) Or Integer(EXG2ANTTLib.LevelLineEnum.exLevelSolidLine);
end;
with Level[1] do
begin
Label := TObject(65536);
Count := 6;
DrawTickLines := EXG2ANTTLib.LevelLineEnum($200 Or Integer(EXG2ANTTLib.LevelLineEnum.exLevelMiddleLine) Or Integer(EXG2ANTTLib.LevelLineEnum.exLevelSolidLine));
DrawTickLinesFrom(0,Integer(EXG2ANTTLib.LevelLineEnum.exLevelUpperHalf) Or Integer(EXG2ANTTLib.LevelLineEnum.exLevelSolidLine));
end;
end;
EndUpdate();
end
|
961
|
How do I replicate the screen shot http://www.exontrol.com/images/exg2antt9.jpg

with AxG2antt1 do
begin
BeginUpdate();
with VisualAppearance do
begin
Add(1,'C:\Program Files\Exontrol\ExG2antt.NET\Sample\EBN\headdark.ebn');
Add(2,'C:\Program Files\Exontrol\ExG2antt.NET\Sample\EBN\xpbsel.ebn');
Add(3,'C:\Program Files\Exontrol\ExG2antt.NET\Sample\EBN\headligh.ebn');
Add(4,'CP:1 0 0 1 1');
end;
(GetOcx() as EXG2ANTTLib.G2antt).BackColorHeader := $4000000;
Chart.BackColorLevelHeader := $4000000;
(GetOcx() as EXG2ANTTLib.G2antt).SelBackColor := $20000ff;
GridLineColor := Color.FromArgb(128,128,128);
HeaderHeight := 22;
SelForeColor := Color.FromArgb(0,0,0);
MarkSearchColumn := False;
ScrollBySingleLine := False;
ShowFocusRect := False;
DefaultItemHeight := 48;
with Columns do
begin
with (Add('Group') as EXG2ANTTLib.Column) do
begin
Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
Def[EXG2ANTTLib.DefColumnEnum.exCellBackColor] := TObject(50331648);
LevelKey := TObject(1);
end;
with (Add('Histogram') as EXG2ANTTLib.Column) do
begin
Width := 18;
AllowSizing := False;
LevelKey := TObject(1);
Position := 0;
end;
end;
with Chart do
begin
FirstVisibleDate := '6/11/2009';
DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines;
PaneWidth[False] := 96;
LevelCount := 2;
DrawLevelSeparator := EXG2ANTTLib.LevelLineEnum.exLevelNoLine;
with Level[0] do
begin
Label := '<%mmmm%> <%yyyy%>';
Unit := EXG2ANTTLib.UnitEnum.exMonth;
Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
end;
with Level[1] do
begin
FormatLabel := 'weekday(dvalue)=1?value:''''';
DrawTickLines := Integer(EXG2ANTTLib.LevelLineEnum.exLevelLowerHalf) Or Integer(EXG2ANTTLib.LevelLineEnum.exLevelSolidLine);
DrawTickLinesFrom(0,EXG2ANTTLib.LevelLineEnum.exLevelSolidLine);
Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
end;
with Bars.Item['Task'] do
begin
Color := $2000000;
Height := 18;
OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack);
HistogramColor := $1000000;
HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation;
end;
HistogramVisible := True;
HistogramHeight := 48;
HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems;
end;
with Items do
begin
h := AddItem('Group <b>A</b>');
CellValueFormat[TObject(h),TObject(0)] := EXG2ANTTLib.ValueFormatEnum.exHTML;
CellMerge[TObject(h),TObject(0)] := TObject(1);
AddBar(h,'Task','6/12/2009','6/19/2009','K1','Requirements');
AddBar(h,'Task','6/13/2009','6/21/2009','K2','Sales & Marketing');
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
CellState[TObject(h),TObject(0)] := 1;
h := AddItem('Group <b>B</b>');
CellValueFormat[TObject(h),TObject(0)] := EXG2ANTTLib.ValueFormatEnum.exHTML;
CellMerge[TObject(h),TObject(0)] := TObject(1);
AddBar(h,'Task','6/14/2009','6/23/2009','K1','<b>GUI</b> Design');
AddBar(h,'Task','6/18/2009','6/25/2009','K2','Class Design');
h := AddItem('Group <b>C</b>');
CellValueFormat[TObject(h),TObject(0)] := EXG2ANTTLib.ValueFormatEnum.exHTML;
CellMerge[TObject(h),TObject(0)] := TObject(1);
AddBar(h,'Task','6/12/2009','6/19/2009','K1','<b>GUI</b> Coding');
AddBar(h,'Task','6/13/2009','6/25/2009','K2','Design & Concept');
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65280);
ItemBar[h,'K2',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65280);
end;
EndUpdate();
end
|
960
|
How can I remove all bars from the chart
with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Items do
begin
AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Nil);
ClearBars(0);
end;
end
|
959
|
How can I change the color for all bars with a specified key
with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Items do
begin
AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Nil);
ItemBar[0,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
end;
end
|
958
|
Is there any automatic way to change a property for all bars with a specified key
with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Items do
begin
AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Nil);
ItemBar[0,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
end;
end
|
957
|
How can I remove all bars with specified key
with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Items do
begin
AddBar(AddItem('Task 1'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 2'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 3'),'Task','1/2/2001','1/4/2001','K1',Nil);
AddBar(AddItem('Task 4'),'Task','1/2/2001','1/4/2001','K2',Nil);
RemoveBar(0,'K1');
end;
end
|
956
|
How do I several bars with different vertical offsets

with AxG2antt1 do
begin
Chart.FirstVisibleDate := '1/1/2001';
Columns.Add('Column');
with Items do
begin
h := AddItem('Item');
ItemHeight[h] := 62;
AddBar(h,'Task','1/2/2001','1/4/2001','T1',Nil);
ItemBar[h,'T1',EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset] := TObject(-23);
AddBar(h,'Task','1/2/2001','1/4/2001','T2',Nil);
ItemBar[h,'T2',EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset] := TObject(-11);
AddBar(h,'Task','1/2/2001','1/4/2001','T3',Nil);
ItemBar[h,'T3',EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset] := TObject(1);
AddBar(h,'Task','1/2/2001','1/4/2001','T4',Nil);
ItemBar[h,'T4',EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset] := TObject(13);
AddBar(h,'Task','1/2/2001','1/4/2001','T5',Nil);
ItemBar[h,'T5',EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset] := TObject(25);
end;
end
|
955
|
Is there any option to show gradient bars without using EBN technology

with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Chart.Bars.Item['Task'] do
begin
Color := $ff;
StartColor := $ff00;
EndColor := $ffff;
Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
end;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/2/2001','1/5/2001','',Nil);
end;
end
|
954
|
How can I define a bar with border and solid filling

with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Chart.Bars.Item['Task'] do
begin
Color := $ff;
StartColor := $ffff;
EndColor := $ffff;
Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
end;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/2/2001','1/5/2001','',Nil);
end;
end
|
953
|
How can I define a bar with border and solid filling

with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Chart.Bars.Item['Task'] do
begin
Color := $ff;
Pattern := EXG2ANTTLib.PatternEnum.exPatternBox;
Height := 18;
end;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/2/2001','1/5/2001','',Nil);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor] := TObject(65535);
end;
end
|
952
|
How do I define a bar with solid border and filling

with AxG2antt1 do
begin
VisualAppearance.Add(1,'C:\Program Files\Exontrol\ExG2antt.NET\sample\EBN\blackboxt.ebn');
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Chart.Bars.Item['Task'] do
begin
Color := $1000000;
Height := 18;
end;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/2/2001','1/5/2001','',Nil);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255);
ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarBackColor] := TObject(65535);
end;
end
|
951
|
Can I control the units/resource/effort being allocated to a bar when displaying OverAllocation histogram

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with (Columns.Add('Effort') as EXG2ANTTLib.Column) do
begin
Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(21);
Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
end;
with Chart do
begin
LevelCount := 2;
NonworkingDays := 0;
PaneWidth[False] := 96;
FirstVisibleDate := '6/20/2005';
HistogramVisible := True;
HistogramHeight := 202;
HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems;
with Bars.Item['Task'] do
begin
HistogramPattern := Integer(EXG2ANTTLib.PatternEnum.exRectangularCurve) Or Integer(EXG2ANTTLib.PatternEnum.exPatternDot);
HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation;
HistogramCriticalValue := 50;
HistogramGridLinesColor := $c0c0c0;
HistogramRulerLinesColor := $10000;
end;
end;
with Items do
begin
AllowCellValueToItemBar := True;
h1 := AddItem('Task 1');
AddBar(h1,'Task','6/21/2005','6/25/2005',Nil,Nil);
CellValue[TObject(h1),TObject(1)] := TObject(2);
h1 := AddItem('Task 2');
AddBar(h1,'Task','6/24/2005','6/28/2005',Nil,Nil);
CellValue[TObject(h1),TObject(1)] := TObject(1);
h1 := AddItem('Task 3');
AddBar(h1,'Task','6/27/2005','7/1/2005',Nil,Nil);
CellValue[TObject(h1),TObject(1)] := TObject(2);
h1 := AddItem('Task 4');
AddBar(h1,'Task','6/30/2005','7/2/2005',Nil,Nil);
CellValue[TObject(h1),TObject(1)] := TObject(1);
end;
EndUpdate();
end
|
950
|
Can I control the units/resource/effort being allocated to a bar when displaying Overload histogram

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with (Columns.Add('Effort') as EXG2ANTTLib.Column) do
begin
Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(21);
Editor.EditType := EXG2ANTTLib.EditTypeEnum.SpinType;
end;
with Chart do
begin
LevelCount := 2;
NonworkingDays := 0;
PaneWidth[False] := 96;
FirstVisibleDate := '6/20/2005';
HistogramVisible := True;
HistogramHeight := 128;
HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems;
with Bars.Item['Task'] do
begin
HistogramPattern := Pattern;
HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverload;
HistogramCriticalValue := 3;
ShowHistogramValues := 'value>3?255:1';
HistogramItems := -11;
HistogramGridLinesColor := $c0c0c0;
HistogramRulerLinesColor := $10000;
end;
end;
with Items do
begin
AllowCellValueToItemBar := True;
h1 := AddItem('Task 1');
AddBar(h1,'Task','6/21/2005','6/23/2005',Nil,Nil);
CellValue[TObject(h1),TObject(1)] := TObject(4);
h1 := AddItem('Task 2');
AddBar(h1,'Task','6/24/2005','6/26/2005',Nil,Nil);
CellValue[TObject(h1),TObject(1)] := TObject(3);
h1 := AddItem('Task 3');
AddBar(h1,'Task','6/27/2005','6/29/2005',Nil,Nil);
CellValue[TObject(h1),TObject(1)] := TObject(2);
h1 := AddItem('Task 4');
AddBar(h1,'Task','6/30/2005','7/2/2005',Nil,Nil);
CellValue[TObject(h1),TObject(1)] := TObject(1);
end;
EndUpdate();
end
|
949
|
How can I display double-lines curves in the histogram

with AxG2antt1 do
begin
AntiAliasing := True;
with Chart do
begin
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 64;
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum.exBezierCurve;
HistogramItems := 3;
HistogramBorderColor := $80;
HistogramColor := $ff;
end;
end;
Columns.Add('Column');
with Items do
begin
AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Nil,Nil);
end;
end
|
948
|
Is there any option to display values in the histogram using different colors

with AxG2antt1 do
begin
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 32;
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
HistogramItems := 6;
ShowHistogramValues := 'value>1?255:65280';
end;
end;
Columns.Add('Column');
with Items do
begin
AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(AddItem('Item 1'),'Task','1/3/2001','1/7/2001',Nil,Nil);
end;
end
|
947
|
Is there any option to display values in the histogram using different colors

with AxG2antt1 do
begin
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 32;
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
HistogramItems := 6;
ShowHistogramValues := 'value>1?255:1';
end;
end;
Columns.Add('Column');
with Items do
begin
AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(AddItem('Item 1'),'Task','1/3/2001','1/7/2001',Nil,Nil);
end;
end
|
946
|
How can I display only few values in the histogram, such as the values greater than a value

with AxG2antt1 do
begin
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 32;
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
ShowHistogramValues := 'value>1';
end;
end;
Columns.Add('Column');
with Items do
begin
AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(AddItem('Item 1'),'Task','1/3/2001','1/7/2001',Nil,Nil);
end;
end
|
945
|
How can I display values in the histogram

with AxG2antt1 do
begin
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 32;
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
ShowHistogramValues := '1';
end;
end;
Columns.Add('Column');
with Items do
begin
AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(AddItem('Item 1'),'Task','1/3/2001','1/7/2001',Nil,Nil);
end;
end
|
944
|
How can I scroll the chart to find a bar
with AxG2antt1 do
begin
Columns.Add('Column');
Chart.LevelCount := 2;
Chart.PaneWidth[False] := 64;
DefaultItemHeight := 32;
with Items do
begin
AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',TObject(1),Nil);
AddBar(AddItem('Item 2'),'Task','1/2/2001','1/4/2001',TObject(2),Nil);
AddBar(AddItem('Item 3'),'Task','1/2/2001','1/4/2001',TObject(3),Nil);
AddBar(AddItem('Item 4'),'Task','1/2/2001','1/4/2001',TObject(4),Nil);
AddBar(AddItem('Item 5'),'Task','1/2/2001','1/4/2001',TObject(5),Nil);
AddBar(AddItem('Item 6'),'Task','1/2/2001','1/4/2001',TObject(6),Nil);
AddBar(AddItem('Item 7'),'Task','1/2/2001','1/4/2001',TObject(7),Nil);
AddBar(AddItem('Item 8'),'Task','1/2/2001','1/4/2001',TObject(8),Nil);
AddBar(AddItem('Item 9'),'Task','1/2/2001','1/4/2001',TObject(8),Nil);
AddBar(AddItem('Item 10'),'Task','1/2/2001','1/4/2001',TObject(10),Nil);
AddBar(AddItem('Item 11'),'Task','1/2/2001','1/4/2001',TObject(11),Nil);
AddBar(AddItem('Item 12'),'Task','1/2/2001','1/4/2001',TObject(12),Nil);
AddBar(AddItem('Item 13'),'Task','1/2/2001','1/4/2001',TObject(13),Nil);
AddBar(AddItem('Item 14'),'Task','1/2/2001','1/4/2001',TObject(14),Nil);
end;
h := Items.FindBar[TObject(14),Nil];
Items.EnsureVisibleItem(h);
Chart.ScrollTo(AxG2antt1.Items.ItemBar[h,TObject(14),EXG2ANTTLib.ItemBarPropertyEnum.exBarStart],TObject(1));
end
|
943
|
Can I change the color/marker/frame for selected bars

with AxG2antt1 do
begin
BeginUpdate();
with VisualAppearance do
begin
Add(2,'c:\exontrol\images\normal.ebn');
Add(1,'CP:2 3 2 -3 -2');
end;
with Chart do
begin
FirstVisibleDate := '1/1/2002';
SelBarColor := $1000000;
PaneWidth[False] := 48;
end;
Columns.Add('Task');
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2002','1/4/2002','A',Nil);
AddBar(h,'Task','1/6/2002','1/10/2002','B',Nil);
AddBar(h,'Task','1/11/2002','1/14/2002','C',Nil);
ItemBar[h,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
ItemBar[h,'B',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
end;
EndUpdate();
end
|
942
|
Can I display a larger marker for selected bars, eventually using the EBN technology

with AxG2antt1 do
begin
BeginUpdate();
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
with Chart do
begin
FirstVisibleDate := '1/1/2002';
SelBarColor := $1000000;
PaneWidth[False] := 48;
end;
Columns.Add('Task');
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2002','1/4/2002','A',Nil);
AddBar(h,'Task','1/6/2002','1/10/2002','B',Nil);
AddBar(h,'Task','1/11/2002','1/14/2002','C',Nil);
ItemBar[h,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
ItemBar[h,'B',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
end;
EndUpdate();
end
|
941
|
How do I change the color for the selected bars

with AxG2antt1 do
begin
BeginUpdate();
Debug := True;
with Chart do
begin
FirstVisibleDate := '1/1/2002';
SelBarColor := $ff;
PaneWidth[False] := 48;
end;
Columns.Add('Task');
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2002','1/4/2002','A',Nil);
AddBar(h,'Task','1/6/2002','1/10/2002','B',Nil);
AddBar(h,'Task','1/11/2002','1/14/2002','C',Nil);
ItemBar[h,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
ItemBar[h,'B',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
end;
EndUpdate();
end
|
940
|
How can I change the background color for child bars of a summary bar

with AxG2antt1 do
begin
BeginUpdate();
LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine;
with Chart do
begin
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exNoCreateBar;
AllowLinkBars := False;
FirstVisibleDate := '1/1/2008';
LevelCount := 2;
PaneWidth[False] := 112;
end;
Columns.Add('');
with Items do
begin
hR1 := AddItem('Team 1');
AddBar(hR1,'Summary','1/2/2008','1/8/2008','',Nil);
ItemBar[hR1,'',EXG2ANTTLib.ItemBarPropertyEnum.exSummaryBarBackColor] := TObject(12895428);
h1 := InsertItem(hR1,Nil,'Member 1');
AddBar(h1,'Task','1/2/2008','1/7/2008',Nil,Nil);
DefineSummaryBars(hR1,'',h1,'');
h1 := InsertItem(hR1,Nil,'Member 2');
AddBar(h1,'Task','1/4/2008','1/9/2008',Nil,Nil);
DefineSummaryBars(hR1,'',h1,'');
h1 := InsertItem(hR1,Nil,'Member 3');
AddBar(h1,'Task','1/5/2008','1/10/2008',Nil,Nil);
DefineSummaryBars(hR1,'',h1,'');
ExpandItem[hR1] := True;
end;
EndUpdate();
end
|
939
|
How can I allow resizing the bar only in the right part of the bar
with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/6/2001','K1',Nil);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize] := TObject(2);
end;
end
|
938
|
How can I allow resizing the bar only in the left part of the bar
with AxG2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/6/2001','K1',Nil);
ItemBar[h,'K1',EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize] := TObject(1);
end;
end
|
937
|
How can I show the links that starts from selected bar being more visible, while the rest being transparent

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 64;
ShowLinksWidth[EXG2ANTTLib.ShowLinksEnum.exShowLinksStartFrom] := 2;
ShowLinksStyle[EXG2ANTTLib.ShowLinksEnum.exShowLinksStartFrom] := EXG2ANTTLib.LinkStyleEnum.exLinkDot;
ShowLinksColor[EXG2ANTTLib.ShowLinksEnum.exShowLinksEndTo] := $c8c8c8;
ShowLinksColor[EXG2ANTTLib.ShowLinksEnum.exShowUnselectedLinks] := $c8c8c8;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/21/2006','9/23/2006',Nil,Nil);
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/25/2006','9/27/2006',Nil,Nil);
ItemBar[h2,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'L1';
h3 := AddItem('Task 3');
AddBar(h3,'Task','9/29/2006','10/2/2006',Nil,Nil);
AddLink('L2',h2,'',h3,'');
Link['L2',EXG2ANTTLib.LinkPropertyEnum.exLinkText] := 'L2';
end;
EndUpdate();
end
|
936
|
How can I show only the links that starts from selected bar

with AxG2antt1 do
begin
BeginUpdate();
MarkSearchColumn := False;
OnResizeControl := EXG2ANTTLib.OnResizeControlEnum.exResizeChart;
Columns.Add('Tasks');
(Columns.Add('Start') as EXG2ANTTLib.Column).Visible := False;
(Columns.Add('End') as EXG2ANTTLib.Column).Visible := False;
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 64;
ShowLinksColor[EXG2ANTTLib.ShowLinksEnum.exShowLinksEndTo] := BackColor;
ShowLinksColor[EXG2ANTTLib.ShowLinksEnum.exShowUnselectedLinks] := BackColor;
end;
with Items do
begin
h1 := AddItem('Task 1');
CellValue[TObject(h1),TObject(1)] := '9/21/2006';
CellValue[TObject(h1),TObject(2)] := '9/24/2006';
AddBar(h1,'Task',CellValue[TObject(h1),TObject(1)],CellValue[TObject(h1),TObject(2)],Nil,Nil);
h2 := InsertItem(h,Nil,'Task 2');
CellValue[TObject(h2),TObject(1)] := '9/25/2006';
CellValue[TObject(h2),TObject(2)] := '9/28/2006';
AddBar(h2,'Task',CellValue[TObject(h2),TObject(1)],CellValue[TObject(h2),TObject(2)],Nil,Nil);
ItemBar[h2,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
AddLink('L1',h1,'',h2,'');
h3 := InsertItem(h,Nil,'Task 3');
CellValue[TObject(h3),TObject(1)] := '9/29/2006';
CellValue[TObject(h3),TObject(2)] := '10/2/2006';
AddBar(h3,'Task',CellValue[TObject(h3),TObject(1)],CellValue[TObject(h3),TObject(2)],Nil,Nil);
AddLink('L2',h2,'',h3,'');
end;
EndUpdate();
end
|
935
|
How can I hide links that are not related to selected bar

with AxG2antt1 do
begin
BeginUpdate();
MarkSearchColumn := False;
OnResizeControl := EXG2ANTTLib.OnResizeControlEnum.exResizeChart;
Columns.Add('Tasks');
(Columns.Add('Start') as EXG2ANTTLib.Column).Visible := False;
(Columns.Add('End') as EXG2ANTTLib.Column).Visible := False;
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 64;
ShowLinksColor[EXG2ANTTLib.ShowLinksEnum.exShowUnselectedLinks] := BackColor;
end;
with Items do
begin
h1 := AddItem('Task 1');
CellValue[TObject(h1),TObject(1)] := '9/21/2006';
CellValue[TObject(h1),TObject(2)] := '9/24/2006';
AddBar(h1,'Task',CellValue[TObject(h1),TObject(1)],CellValue[TObject(h1),TObject(2)],Nil,Nil);
ItemBar[h1,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarSelected] := TObject(True);
h2 := InsertItem(h,Nil,'Task 2');
CellValue[TObject(h2),TObject(1)] := '9/25/2006';
CellValue[TObject(h2),TObject(2)] := '9/28/2006';
AddBar(h2,'Task',CellValue[TObject(h2),TObject(1)],CellValue[TObject(h2),TObject(2)],Nil,Nil);
AddLink('L1',h1,'',h2,'');
h3 := InsertItem(h,Nil,'Task 3');
CellValue[TObject(h3),TObject(1)] := '9/29/2006';
CellValue[TObject(h3),TObject(2)] := '10/2/2006';
AddBar(h3,'Task',CellValue[TObject(h3),TObject(1)],CellValue[TObject(h3),TObject(2)],Nil,Nil);
AddLink('L2',h2,'',h3,'');
end;
EndUpdate();
end
|
934
|
How can I show the direction of the link using EBN files

with AxG2antt1 do
begin
BeginUpdate();
with VisualAppearance do
begin
Add(1,'c:\exontrol\images\normal.ebn');
Add(2,'CP:1 -1 -1 1 1');
Add(3,'CP:1 -2 -2 2 2');
end;
with Chart do
begin
FirstVisibleDate := '1/1/2001';
PaneWidth[False] := 128;
end;
Columns.Add('Column');
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','1/2/2001','1/4/2001','B1',Nil);
h2 := AddItem('Task 2');
AddBar(h2,'Task','1/5/2001','1/13/2001','B2',Nil);
AddLink('L1',h1,'B1',h2,'B2');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkArrowColor] := TObject(16777216);
h2 := AddItem('Task 3');
AddBar(h2,'Task','1/5/2001','1/13/2001','B3',Nil);
AddLink('L2',h1,'B1',h2,'B3');
Link['L2',EXG2ANTTLib.LinkPropertyEnum.exLinkArrowColor] := TObject(33554432);
h2 := AddItem('Task 4');
AddBar(h2,'Task','1/5/2001','1/13/2001','B5',Nil);
AddLink('L3',h1,'B1',h2,'B5');
Link['L3',EXG2ANTTLib.LinkPropertyEnum.exLinkArrowColor] := TObject(50331648);
end;
EndUpdate();
end
|
933
|
How can I show round links

with AxG2antt1 do
begin
Chart.FirstVisibleDate := '1/1/2001';
Columns.Add('Column');
with Items do
begin
AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001','B1',Nil);
AddBar(AddItem('Item 2'),'Task','1/5/2001','1/13/2001','B2',Nil);
AddLink('L1',FindItem['Item 1',TObject(0),Nil],'B1',FindItem['Item 2',TObject(0),Nil],'B2');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound] := TObject(True);
end;
end
|
932
|
How can I change the color to display the arrow of the link

with AxG2antt1 do
begin
Chart.FirstVisibleDate := '1/1/2001';
Columns.Add('Column');
with Items do
begin
AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001','B1',Nil);
AddBar(AddItem('Item 2'),'Task','1/6/2001','1/14/2001','B2',Nil);
AddLink('L1',FindItem['Item 1',TObject(0),Nil],'B1',FindItem['Item 2',TObject(0),Nil],'B2');
Link['L1',EXG2ANTTLib.LinkPropertyEnum.exLinkArrowColor] := TObject(255);
end;
end
|
931
|
I use UnitScale: exHour and I want to show only from 9 to 18 hour. The idea is to show only the working part of a day. Is this possible

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
MarkTodayColor := BackColor;
BackColorLevelHeader := $ffffff;
PaneWidth[False] := 0;
LevelCount := 2;
with Level[0] do
begin
Label := '<b><%dddd%></b> <%d%>';
Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
DrawTickLines := EXG2ANTTLib.LevelLineEnum.exLevelNoLine;
end;
with Level[1] do
begin
Label := TObject(65536);
DrawTickLines := Integer(EXG2ANTTLib.LevelLineEnum.exLevelMiddleLine) Or Integer(EXG2ANTTLib.LevelLineEnum.exLevelDotLine);
DrawTickLinesFrom(0,EXG2ANTTLib.LevelLineEnum.exLevelDotLine);
end;
NonworkingHours := 16253439;
ShowNonworkingUnits := False;
ShowNonworkingDates := False;
ShowNonworkingHours := False;
end;
EndUpdate();
end
|
930
|
Can I display tick lines from other level to my base level so time units gets separated more clearly

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
DrawLevelSeparator := EXG2ANTTLib.LevelLineEnum.exLevelNoLine;
UnitWidth := 24;
FirstVisibleDate := '1/1/2001';
PaneWidth[False] := 0;
LevelCount := 2;
with Level[0] do
begin
Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
Label := '<%dddd%>';
DrawTickLines := Integer(EXG2ANTTLib.LevelLineEnum.exLevelLowerHalf) Or Integer(EXG2ANTTLib.LevelLineEnum.exLevelSolidLine);
end;
with Level[1] do
begin
Label := TObject(65536);
Count := 6;
DrawTickLines := Integer(EXG2ANTTLib.LevelLineEnum.exLevelMiddleLine) Or Integer(EXG2ANTTLib.LevelLineEnum.exLevelSolidLine);
DrawTickLinesFrom(0,EXG2ANTTLib.LevelLineEnum.exLevelSolidLine);
end;
end;
EndUpdate();
end
|
929
|
Is there any property to change the style of the tick lines being shown in the chart

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
UnitWidth := 24;
FirstVisibleDate := '1/1/2001';
PaneWidth[False] := 0;
LevelCount := 2;
with Level[0] do
begin
Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
Label := '<%dddd%>';
DrawTickLines := EXG2ANTTLib.LevelLineEnum.exLevelSolidLine;
end;
with Level[1] do
begin
Label := TObject(65536);
Count := 6;
DrawTickLines := Integer(EXG2ANTTLib.LevelLineEnum.exLevelUpperHalf) Or Integer(EXG2ANTTLib.LevelLineEnum.exLevelSolidLine);
end;
DrawLevelSeparator := EXG2ANTTLib.LevelLineEnum.exLevelSolidLine;
end;
EndUpdate();
end
|
928
|
Is there any property to change the style of the tick lines being shown in the chart

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '1/1/2001';
PaneWidth[False] := 0;
LevelCount := 2;
DrawLevelSeparator := EXG2ANTTLib.LevelLineEnum.exLevelSolidLine;
with Level[0] do
begin
Label := '<%dddd%>';
DrawTickLines := EXG2ANTTLib.LevelLineEnum.exLevelSolidLine;
end;
with Level[1] do
begin
Label := TObject(65536);
Count := 6;
DrawTickLines := EXG2ANTTLib.LevelLineEnum.exLevelSolidLine;
end;
end;
EndUpdate();
end
|
927
|
How can I show the levels based on the base level so tick lines aligns better

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
AdjustLevelsToBase := True;
UnitWidth := 24;
FirstVisibleDate := '1/1/2001';
PaneWidth[False] := 0;
LevelCount := 2;
Level[0].Label := '<%dddd%>';
with Level[1] do
begin
Label := TObject(65536);
Count := 5;
end;
end;
EndUpdate();
end
|
926
|
How can I show only working hours in other words only the working part of the day

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
AllowSelectDate := EXG2ANTTLib.SelectDateEnum.exNoSelectDate;
MarkTodayColor := BackColor;
PaneWidth[False] := 0;
LevelCount := 2;
with Level[0] do
begin
Label := '<b><%dddd%></b> <%d%>';
Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment;
DrawTickLines := EXG2ANTTLib.LevelLineEnum.exLevelNoLine;
end;
with Level[1] do
begin
Label := TObject(65536);
ReplaceLabel['09'] := '<fgcolor=FF0000><b><font ;10>9</font></b></fgcolor>';
end;
NonworkingHours := 16253439;
ShowNonworkingUnits := False;
ShowNonworkingDates := False;
ShowNonworkingHours := False;
end;
EndUpdate();
end
|
925
|
How can I specify the effort for bars when displaying the overload histogram

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
LevelCount := 2;
NonworkingDays := 0;
PaneWidth[False] := 52;
FirstVisibleDate := '6/20/2005';
HistogramVisible := True;
HistogramHeight := 64;
HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems;
with Bars.Item['Task'] do
begin
HistogramPattern := Pattern;
HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverload;
HistogramItems := -6;
HistogramGridLinesColor := $c0c0c0;
HistogramRulerLinesColor := $10000;
end;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','6/21/2005','6/23/2005','','4');
ItemBar[h1,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(4);
h1 := AddItem('Task 2');
AddBar(h1,'Task','6/24/2005','6/26/2005','',TObject(3));
ItemBar[h1,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(3);
h1 := AddItem('Task 3');
AddBar(h1,'Task','6/27/2005','6/29/2005','',TObject(2));
ItemBar[h1,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(2);
h1 := AddItem('Task 4');
AddBar(h1,'Task','6/30/2005','7/2/2005','',TObject(1));
end;
EndUpdate();
end
|
924
|
How can I display the cumulative histogram and showing the bars that generated it using different colors

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 64;
PaneWidth[False] := 128;
HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems);
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistCumulative;
HistogramCumulativeOriginalColorBars := EXG2ANTTLib.HistogramCumulativeOriginalColorBarsEnum.exChangeColor;
HistogramItems := 6;
HistogramRulerLinesColor := $80;
HistogramBorderColor := $1;
end;
end;
with (Columns.Add('Column') as EXG2ANTTLib.Column) do
begin
Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
PartialCheck := True;
end;
with Items do
begin
h := AddItem('Project 1');
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/3/2001','1/5/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 3'),'Task','1/4/2001','1/6/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 4'),'Task','1/2/2001','1/8/2001',Nil,Nil);
CellState[TObject(ItemByIndex[1]),TObject(0)] := 1;
ExpandItem[h] := True;
end;
EndUpdate();
end
|
923
|
How can I show the cumulative histogram for my bar

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 64;
PaneWidth[False] := 128;
HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems);
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistCumulative;
HistogramItems := 6;
HistogramRulerLinesColor := $80;
HistogramBorderColor := $1;
end;
end;
with (Columns.Add('Column') as EXG2ANTTLib.Column) do
begin
Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
PartialCheck := True;
end;
with Items do
begin
h := AddItem('Project 1');
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/3/2001','1/5/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 3'),'Task','1/4/2001','1/6/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 4'),'Task','1/2/2001','1/8/2001',Nil,Nil);
CellState[TObject(ItemByIndex[1]),TObject(0)] := 1;
ExpandItem[h] := True;
end;
EndUpdate();
end
|
922
|
How can I show some grid lines or ruler in the histogram

with AxG2antt1 do
begin
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 64;
PaneWidth[False] := 78;
HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems);
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
HistogramItems := 6;
HistogramRulerLinesColor := $80;
HistogramGridLinesColor := $ff;
end;
end;
Columns.Add('Column');
with Items do
begin
h := AddItem('Project 1');
CellHasCheckBox[TObject(h),TObject(0)] := True;
CellState[TObject(h),TObject(0)] := 1;
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/3/2001','1/5/2001',Nil,Nil);
ExpandItem[h] := True;
end;
end
|
921
|
Is there any property to show some grid lines in the histogram

with AxG2antt1 do
begin
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 64;
PaneWidth[False] := 78;
HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems);
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
HistogramItems := 6;
HistogramGridLinesColor := $ff;
end;
end;
Columns.Add('Column');
with Items do
begin
h := AddItem('Project 1');
CellHasCheckBox[TObject(h),TObject(0)] := True;
CellState[TObject(h),TObject(0)] := 1;
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/3/2001','1/5/2001',Nil,Nil);
ExpandItem[h] := True;
end;
end
|
920
|
How can I specify a fixed number of bars/items being shown in the histogram

with AxG2antt1 do
begin
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 64;
PaneWidth[False] := 78;
HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems);
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
HistogramCriticalValue := 3;
HistogramItems := -6;
HistogramRulerLinesColor := $1;
end;
end;
Columns.Add('Column');
with Items do
begin
h := AddItem('Project 1');
CellHasCheckBox[TObject(h),TObject(0)] := True;
CellState[TObject(h),TObject(0)] := 1;
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/3/2001','1/5/2001',Nil,Nil);
ExpandItem[h] := True;
h := AddItem('Project 2');
CellHasCheckBox[TObject(h),TObject(0)] := True;
CellState[TObject(h),TObject(0)] := 1;
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/4/2001','1/7/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/6/2001','1/8/2001',Nil,Nil);
ExpandItem[h] := True;
h := AddItem('Project 3');
CellHasCheckBox[TObject(h),TObject(0)] := True;
CellState[TObject(h),TObject(0)] := 1;
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/3/2001','1/5/2001',Nil,Nil);
ExpandItem[h] := True;
h := AddItem('Project 4');
CellHasCheckBox[TObject(h),TObject(0)] := True;
CellState[TObject(h),TObject(0)] := 1;
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/4/2001','1/7/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/6/2001','1/8/2001',Nil,Nil);
ExpandItem[h] := True;
end;
end
|
919
|
Is there any option to specify a minimum number of bars/items displayed in the histogram

with AxG2antt1 do
begin
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 64;
PaneWidth[False] := 78;
HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems);
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
HistogramItems := 6;
HistogramGridLinesColor := $1;
HistogramRulerLinesColor := $1;
end;
end;
Columns.Add('Column');
with Items do
begin
h := AddItem('Project 1');
CellHasCheckBox[TObject(h),TObject(0)] := True;
CellState[TObject(h),TObject(0)] := 1;
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/3/2001','1/5/2001',Nil,Nil);
ExpandItem[h] := True;
h := AddItem('Project 2');
CellHasCheckBox[TObject(h),TObject(0)] := True;
CellState[TObject(h),TObject(0)] := 1;
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/4/2001','1/7/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/6/2001','1/8/2001',Nil,Nil);
ExpandItem[h] := True;
end;
end
|
918
|
How can I show the histogram without grouping the bars based on their parents

with AxG2antt1 do
begin
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 32;
HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems);
Bars.Item['Task'].HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
end;
Columns.Add('Column');
with Items do
begin
h := AddItem('Project 1');
CellHasCheckBox[TObject(h),TObject(0)] := True;
CellState[TObject(h),TObject(0)] := 1;
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/3/2001','1/5/2001',Nil,Nil);
ExpandItem[h] := True;
h := AddItem('Project 2');
CellHasCheckBox[TObject(h),TObject(0)] := True;
CellState[TObject(h),TObject(0)] := 1;
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/4/2001','1/7/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/6/2001','1/8/2001',Nil,Nil);
ExpandItem[h] := True;
end;
end
|
917
|
How can I show the histogram for checked item and all recursively child items

with AxG2antt1 do
begin
BeginUpdate();
with Chart do
begin
PaneWidth[False] := 128;
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 128;
HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramRecLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems);
Bars.Item['Task'].HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
end;
Columns.Add('Column');
with Items do
begin
h := AddItem('Project');
CellHasCheckBox[TObject(h),TObject(0)] := True;
CellState[TObject(h),TObject(0)] := 1;
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/3/2001','1/5/2001',Nil,Nil);
ExpandItem[h] := True;
h := InsertItem(h,Nil,'SubProject');
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/3/2001','1/7/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/5/2001','1/8/2001',Nil,Nil);
ExpandItem[h] := True;
end;
EndUpdate();
end
|
916
|
How can I show the histogram for checked item and its child items

with AxG2antt1 do
begin
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 32;
HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems);
Bars.Item['Task'].HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
end;
Columns.Add('Column');
with Items do
begin
h := AddItem('Project');
CellHasCheckBox[TObject(h),TObject(0)] := True;
AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/3/2001','1/7/2001',Nil,Nil);
ExpandItem[h] := True;
end;
end
|
915
|
How can I show the histogram for all items

with AxG2antt1 do
begin
BeginUpdate();
SingleSel := False;
with Chart do
begin
FirstVisibleDate := '1/1/2001';
LevelCount := 2;
HistogramVisible := True;
HistogramHeight := 32;
HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems;
Bars.Item['Task'].HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
end;
Columns.Add('Column');
with Items do
begin
AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Nil,Nil);
end;
EndUpdate();
end
|
914
|
How can I prevent selecting a new item when clicking the chart area so my selection is shown in the histogram

with AxG2antt1 do
begin
SingleSel := False;
with Chart do
begin
SelectOnClick := False;
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 32;
HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems;
Bars.Item['Task'].HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
end;
Columns.Add('Column');
with Items do
begin
AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Nil,Nil);
SelectItem[ItemByIndex[0]] := True;
end;
end
|
913
|
How can I show bars in the histogram for selected items only

with AxG2antt1 do
begin
SingleSel := False;
with Chart do
begin
FirstVisibleDate := '1/1/2001';
HistogramVisible := True;
HistogramHeight := 32;
HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems;
Bars.Item['Task'].HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal;
end;
Columns.Add('Column');
with Items do
begin
AddBar(AddItem('Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil);
AddBar(AddItem('Item 2'),'Task','1/3/2001','1/7/2001',Nil,Nil);
SelectItem[ItemByIndex[0]] := True;
end;
end
|
912
|
How can I change the color and size for the curve in the histogram

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
LevelCount := 2;
NonworkingDays := 0;
PaneWidth[False] := 64;
FirstVisibleDate := '6/20/2005';
HistogramVisible := True;
HistogramHeight := 68;
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum($100 Or Integer(EXG2ANTTLib.PatternEnum.exPatternDot));
HistogramBorderColor := $ff00;
HistogramBorderSize := 5;
end;
end;
with Items do
begin
h1 := AddItem('Task');
AddBar(h1,'Task','6/21/2005','6/25/2005',TObject(1),TObject(1));
AddBar(h1,'Task','6/23/2005','6/28/2005',TObject(2),TObject(2));
end;
EndUpdate();
end
|
911
|
How can I change the color for the frame in the histogram

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
LevelCount := 2;
NonworkingDays := 0;
PaneWidth[False] := 64;
FirstVisibleDate := '6/20/2005';
HistogramVisible := True;
HistogramHeight := 68;
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum($100 Or Integer(EXG2ANTTLib.PatternEnum.exPatternShadow));
HistogramItems := 5;
HistogramBorderColor := $ff;
end;
end;
with Items do
begin
h1 := AddItem('Task');
AddBar(h1,'Task','6/21/2005','6/25/2005',TObject(1),TObject(1));
AddBar(h1,'Task','6/23/2005','6/28/2005',TObject(2),TObject(2));
end;
EndUpdate();
end
|
910
|
How can I force the histogram for a bar being shown all the time

with AxG2antt1 do
begin
BeginUpdate();
ScrollBySingleLine := True;
(Columns.Add('Tasks') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
with Chart do
begin
LevelCount := 2;
NonworkingDays := 0;
PaneWidth[False] := 64;
FirstVisibleDate := '6/20/2005';
HistogramVisible := True;
HistogramHeight := 68;
HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramUnlockedItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramCheckedItems);
with Bars.Copy('Task','H') do
begin
Color := $ff00;
HistogramPattern := EXG2ANTTLib.PatternEnum($100);
HistogramItems := 5;
HistogramColor := Color;
HistogramGridLinesColor := $808080;
HistogramRulerLinesColor := $10000;
end;
with Bars.Item['Task'] do
begin
HistogramCriticalColor := $800000;
HistogramPattern := Pattern;
HistogramItems := 5;
HistogramGridLinesColor := $808080;
HistogramRulerLinesColor := $10000;
end;
end;
with Items do
begin
h1 := AddItem('Hidden');
AddBar(h1,'H','6/23/2005','6/28/2005',TObject(1),Nil);
AddBar(h1,'H','6/24/2005','6/26/2005',TObject(2),Nil);
CellState[TObject(h1),TObject(0)] := 1;
ItemHeight[h1] := 0;
SelectableItem[h1] := False;
h1 := AddItem('Task 1');
AddBar(h1,'Task','6/21/2005','6/25/2005',TObject(1),Nil);
CellState[TObject(h1),TObject(0)] := 1;
h1 := AddItem('Task 2');
CellState[TObject(h1),TObject(0)] := 1;
AddBar(h1,'Task','6/24/2005','7/1/2005',TObject(1),Nil);
end;
EndUpdate();
end
|
909
|
How can I remove a bar type from the histogram

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
LevelCount := 2;
NonworkingDays := 0;
PaneWidth[False] := 40;
FirstVisibleDate := '6/20/2005';
HistogramVisible := True;
HistogramHeight := 32;
with Bars.Item['Task'] do
begin
HistogramCriticalColor := $800000;
HistogramPattern := Pattern;
end;
with Bars.Copy('Task','Green') do
begin
Color := $ff00;
HistogramPattern := Pattern;
end;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Green','6/22/2005','6/26/2005',TObject(0),Nil);
AddBar(h1,'Task','6/21/2005','6/25/2005',TObject(1),Nil);
ItemBar[h1,TObject(1),EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset] := TObject(3);
h1 := AddItem('Task 2');
AddBar(h1,'Green','6/28/2005','6/30/2005',TObject(0),Nil);
AddBar(h1,'Task','6/27/2005','7/1/2005',TObject(1),Nil);
ItemBar[h1,TObject(1),EXG2ANTTLib.ItemBarPropertyEnum.exBarOffset] := TObject(3);
end;
with Chart.Bars.Item['Green'] do
begin
HistogramColor := Color;
HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternEmpty;
end;
EndUpdate();
end
|
908
|
How can I show the two buttons in the vertical splitter but still resizes the chart when the control gets resized

with AxG2antt1 do
begin
OnResizeControl := Integer(EXG2ANTTLib.OnResizeControlEnum.exSplitterShowButtons) Or Integer(EXG2ANTTLib.OnResizeControlEnum.exResizeChart);
Chart.PaneWidth[False] := 96;
Chart.LevelCount := 2;
end
|
907
|
I have seen a screen shot on your web page that shows two buttons on the vertical scroll bar. How can I show them
with AxG2antt1 do
begin
OnResizeControl := EXG2ANTTLib.OnResizeControlEnum.exSplitterShowButtons;
Chart.PaneWidth[False] := 96;
end
|
906
|
How can I disable selecting a new item once the user clicks the chart area

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
SingleSel := False;
with Chart do
begin
SelectOnClick := False;
AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
LevelCount := 2;
PaneWidth[False] := 40;
FirstVisibleDate := '6/20/2005';
HistogramVisible := True;
HistogramHeight := 32;
HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramSelectedItems;
Bars.Item['Task'].HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternSolid;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','6/22/2005','6/26/2005',TObject(0),Nil);
SelectItem[h1] := True;
h1 := AddItem('Task 2');
AddBar(h1,'Task','6/24/2005','6/30/2005',TObject(0),Nil);
SelectItem[h1] := True;
end;
EndUpdate();
end
|
905
|
Is there any option to display the chart's header in the bottom side of the histogram

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
LevelCount := 2;
NonworkingDays := 0;
PaneWidth[False] := 40;
FirstVisibleDate := '6/20/2005';
HistogramVisible := True;
HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems;
HistogramHeight := 96;
HistogramHeaderVisible := True;
with Bars.Item['Task'] do
begin
Color := $ff0000;
OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset;
OverlaidGroup := 'Task2';
HistogramCriticalColor := $800000;
HistogramPattern := EXG2ANTTLib.PatternEnum.exBezierCurve;
HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation;
end;
with Bars.Copy('Task','Task2') do
begin
Color := $ff00;
OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset;
OverlaidGroup := 'Task';
HistogramCriticalColor := $8000;
HistogramPattern := EXG2ANTTLib.PatternEnum.exBezierCurve;
HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation;
end;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task2','6/22/2005','6/26/2005',TObject(0),Nil);
AddBar(h1,'Task','6/21/2005','6/25/2005',TObject(1),Nil);
ItemBar[h1,TObject(0),EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(3);
ItemBar[h1,TObject(1),EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(4);
h1 := AddItem('Task 2');
AddBar(h1,'Task2','6/28/2005','6/30/2005',TObject(0),Nil);
AddBar(h1,'Task','6/27/2005','7/1/2005',TObject(1),Nil);
ItemBar[h1,TObject(0),EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(4);
ItemBar[h1,TObject(1),EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(1);
end;
EndUpdate();
end
|
904
|
How can I display the child bars as soon as an item gets collapsed

with AxG2antt1 do
begin
BeginUpdate();
LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
ShowCollapsedBars := True;
LevelCount := 2;
PaneWidth[False] := 96;
end;
with Items do
begin
h := AddItem('Project 1');
h1 := InsertItem(h,Nil,'Task 1');
AddBar(h1,'Task','9/21/2006','9/23/2006','A',Nil);
h2 := InsertItem(h,Nil,'Task 2');
AddBar(h2,'Task','9/24/2006','9/26/2006','B',Nil);
h3 := InsertItem(h,Nil,'Task 3');
AddBar(h3,'Task','9/27/2006','9/29/2006','C',Nil);
h := AddItem('Project 2');
h1 := InsertItem(h,Nil,'Task 1');
AddBar(h1,'Task','9/21/2006','9/23/2006','A',Nil);
h2 := InsertItem(h,Nil,'Task 2');
AddBar(h2,'Task','9/24/2006','9/26/2006','B',Nil);
h3 := InsertItem(h,Nil,'Task 3');
AddBar(h3,'Task','9/27/2006','9/29/2006','C',Nil);
ExpandItem[h] := True;
end;
EndUpdate();
end
|
903
|
What exBarEffort property represents

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
LevelCount := 2;
PaneWidth[False] := 40;
FirstVisibleDate := '6/9/2005';
HistogramVisible := True;
HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems;
HistogramHeight := 164;
with Bars.Item['Task'] do
begin
HistogramPattern := EXG2ANTTLib.PatternEnum($100);
HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation;
end;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','6/10/2005','6/11/2005',Nil,'1/1=<b>100%');
ItemBar[h1,Nil,EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
h1 := AddItem('Task 2');
AddBar(h1,'Task','6/12/2005','6/14/2005',Nil,'1/2=<b>50%');
ItemBar[h1,Nil,EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
h1 := AddItem('Task 3');
AddBar(h1,'Task','6/15/2005','6/18/2005',Nil,'1/3=<b>33%');
ItemBar[h1,Nil,EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
h1 := AddItem('Task 4');
AddBar(h1,'Task','6/19/2005','6/23/2005',Nil,'1/4=<b>25%');
ItemBar[h1,Nil,EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
h1 := AddItem('Task 5');
AddBar(h1,'Task','6/24/2005','6/29/2005',Nil,'1/5=<b>20%');
ItemBar[h1,Nil,EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18);
end;
EndUpdate();
end
|
902
|
Can I display multiple curves in the histogram

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
LevelCount := 2;
NonworkingDays := 0;
PaneWidth[False] := 40;
FirstVisibleDate := '6/20/2005';
HistogramVisible := True;
HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems;
HistogramHeight := 64;
with Bars.Item['Task'] do
begin
Color := $ff0000;
OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset;
OverlaidGroup := 'Task2';
HistogramCriticalColor := $800000;
HistogramPattern := EXG2ANTTLib.PatternEnum.exBezierCurve;
HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation;
end;
with Bars.Copy('Task','Task2') do
begin
Color := $ff00;
OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset;
OverlaidGroup := 'Task';
HistogramCriticalColor := $8000;
HistogramPattern := EXG2ANTTLib.PatternEnum.exBezierCurve;
HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation;
end;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task2','6/22/2005','6/26/2005',TObject(0),Nil);
AddBar(h1,'Task','6/21/2005','6/25/2005',TObject(1),Nil);
ItemBar[h1,TObject(0),EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(3);
ItemBar[h1,TObject(1),EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(4);
h1 := AddItem('Task 2');
AddBar(h1,'Task2','6/28/2005','6/30/2005',TObject(0),Nil);
AddBar(h1,'Task','6/27/2005','7/1/2005',TObject(1),Nil);
ItemBar[h1,TObject(0),EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(4);
ItemBar[h1,TObject(1),EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(1);
end;
EndUpdate();
end
|
901
|
How can I use the exBarEffort property

with AxG2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
LevelCount := 2;
NonworkingDays := 0;
PaneWidth[False] := 40;
FirstVisibleDate := '6/20/2005';
HistogramVisible := True;
HistogramHeight := 64;
HistogramView := EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems;
with Bars.Item['Task'] do
begin
HistogramCriticalColor := $ff;
HistogramPattern := EXG2ANTTLib.PatternEnum.exBezierCurve;
HistogramType := EXG2ANTTLib.HistogramTypeEnum.exHistOverAllocation;
end;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','6/21/2005','6/25/2005',Nil,Nil);
ItemBar[h1,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(4);
h1 := AddItem('Task 2');
AddBar(h1,'Task','6/27/2005','7/1/2005',Nil,Nil);
ItemBar[h1,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarEffort] := TObject(1);
end;
EndUpdate();
end
|